home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / dizl140.zip / DIZLSTRC.PAS < prev    next >
Pascal/Delphi Source File  |  1997-05-09  |  7KB  |  140 lines

  1. UNIT DIZLSTRC;
  2. Interface
  3. USES DOS,CRT;
  4. {
  5.  COPYRIGHT 1997, ALL RIGHTS ARE RESERVED BY MARK BLOSS/MIND OVER BYTE SOFTWARE
  6.  ┌───────────────────────────────────────────────────────────────────────────┐
  7.  │     ▄██▄   ▄██▄  ▄█▄  ▄██▄   ▄██▄ ▄████████▄                              │
  8.  │     █████▄█████ █████ █████▄ ████ ████   ▀███   These Structures define   │
  9.  │     ███████████ █████ ███████████ ████    ███   the format that DIZL.EXE, │
  10.  │     ████ ▀ ████ █████ ████▀██████ ████    ███   and DZSETUP use for v1.0  │
  11.  │     ████   ████ █████ ████  ▀████ ████▄▄▄███▀   to store the data they    │
  12.  │     ▀██▀▀▀▀▀▀█▀ ▀▀█▀  ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀██▀     need.  You may use the    │
  13.  │       ▀▀   ▀▀   ▀▀   ▀▀  ▀▀      ▀▀  ▀▀▀        same structures to access │
  14.  │      ▀▀▀   ▀▀▀   ▀▀ ▀▀   ▀▀▀▀▀   ▀▀▀▀▀▀         this data in your own     │
  15.  │       ▀▀   ▀▀     ▀▀▀    ▀▀      ▀▀  ▀▀         support and/or kludge     │
  16.  │        ▀▀▀▀▀       ▀     ▀▀▀▀▀▀▀ ▀▀   ▀▀        programs if you choose.   │
  17.  │         ░░   ░░  ░░  ░░     ░░    ░░                                      │
  18.  │         ▒▒▒▒▒▒    ▒▒▒▒      ▒▒    ▒▒▒▒▒         Public release of any     │
  19.  │         ▓▓   ▓▓    ▓▓       ▓▓    ▓▓            program for DIZL.EXE's    │
  20.  │         ██████     ██       ██    ██████        data must be approved     │
  21.  │           S  O  F  T  W  A  R  E  (tm)          by Mind Over Byte Software│
  22.  │           A SPYER BBS (615)831-9284                                       │
  23.  └───────────────────────────────────────────────────────────────────────────┘
  24. }
  25.  
  26. Const BufSize = 500;       { DO NOT CHANGE ANY VALUES IN THIS FILE }
  27.  
  28.  
  29. CONST
  30.     f_no_des     = 0;        { descOrigin definitions }
  31.     f_fileid     = 1;        { See DescriptionRecord defined below }
  32.     f_desdi      = 2;        { DESC.SDI }
  33.     f_ndos       = 4;        { DESCRIPT.ION }
  34.     f_fbbs       = 8;        { FILES.BBS }
  35.     f_sdnid      = 16;       { SDN.ID }
  36.     f_vend       = 32;       { VENDINFO.DIZ }
  37.     pack         = false;    { used in ExecArray as indices }
  38.     unpack       = true;
  39.  
  40. TYPE
  41.    DizType    = Array [0..BufSize-1] of Char;
  42.    DesignType = (BASIC,SHORT,GOTHIC,BOXED,JAILHOUSE,STRATA,RIVER,FBBSL);
  43.    { PLEASE NOTE THAT UC2 IS NOT SUPPORTED }
  44.    ArchiveType = (ARJ,ZIP,RAR,UC2,ARC,SQZ,ZOO,LZH,UNKNOWN);
  45.    DescrType = (FBBS,NDOS,ALL,D_NONE);
  46.  
  47.    DescriptionRecord = Record   { *.DAT STRUCTURE }
  48.      fpath       : PathStr;     { path to file }
  49.      validdesc   : boolean;     { does desc reflect good description? }
  50.      remove      : boolean;     { set to true if file no longer exists }
  51.      Desc        : DizType;     { The Description from file_id.diz, etc }
  52.      Fn          : String[12];  { filename = string[12] }
  53.      Sz          : longint;     { filesize }
  54.      Dt          : longint;     { file date/time }
  55.      DpDesc      : String[45];  { AREA Description from *.INI }
  56.      Duped       : boolean;     { Two or more same file in different dirs }
  57.      DescOrigin  : byte;        { 0=none,1=file_id.diz,2=desc.sdi,4=4dos,8=files.bbs}
  58.      Purge       : boolean;     { True if two duplicate records of same file, or...}
  59.                                 { if record no longer defined in configuration. }
  60.      uubuffer    : Array [0..38] of byte;  { Unused buffer }
  61.    End;
  62.  
  63.    DescDataFile = File of DescriptionRecord;  { The *.DAT file }
  64.  
  65.    FfPtr = ^FileFindRec;        { Pointer used with LL }
  66.  
  67.    FileFindRec = Record         { *.IDX STRUCTURE }
  68.      filename : String[12];     { The FileName }
  69.      areanum  : byte;           { Area Number (from Config (*.INI) }
  70.      RecPos   : LongInt;        { Seek(*.DAT, RecPos) then Read/Write }
  71.      uubyte   : byte;           { Unused byte }
  72.      listed   : boolean;        { Already written to list file? Only... }
  73.                                 { used during creating list file itself.}
  74.                                 { Always Save to disk as false! }
  75.      Next     : ffptr;          { Pointer to next node in LL }
  76.    End;
  77.  
  78.    FileFindFile = file of FileFindRec;       { The *.IDX file }
  79.  
  80.    { NESTED IN *.INI FILE }
  81.    ExecRec  =  record        { Record Definition of ExecArray Element }
  82.     Progname :  PathStr;     { Program Path/Name }
  83.     Cmdline  :  PathStr;     { Commandline parameters }
  84.     Found    :  Boolean;     { Set true if found in PATH }
  85.    End;    { Found boolean updated each time DIZL is run }
  86.  
  87.   ExecArray = Array [pack..unpack,ARJ..UNKNOWN] of ExecRec;
  88.  
  89.   ConfigRec  = Record                   { *.INI STRUCTURE }
  90.    VersionNum       : String[5];        { Ex: 'v38ß'); }
  91.    DataBaseName     : String[8];          { "DIZLIST" is default }
  92.    MinToPack        : Byte ;            { default = 8  (8%) }
  93.    CurrDsgn         : DesignType;
  94.    AltDescribe      : DescrType; { defines what to use for alt. descriptions }
  95.    MagicArchiveType,             { ArchiveType used when archiving MiniList}
  96.    ListArchiveType  : String[3]; { ArchiveType used when archiving lists }
  97.  
  98.    uuarray          : array [0..14] of byte;
  99.  
  100.    SWAP,                        { SWAP out memory? }
  101.    Logging,                     { Enable logging? }
  102.    LogCfgEnable,                { Log Configuration? }
  103.    AddDiz,                      { add descriptions to archives when allowed? }
  104.    OnlyAlternate,               { Use ONLY alternate files (no unpacking) }
  105.    ArchiveList,                 { Create an Archive of lists at eoj? }
  106.    CreateAll,                   { Create an ALLFILES list? }
  107.    CreateAreas,                 { Create an Areas List? }
  108.    SkipCheckDesc,               { If invalid description, check for one again? }
  109.    SkipDesc,                    { Skip inclusion of Non-descriptions in list? }
  110.    Magics,                      { Magic names in List? }
  111.    MagicMini,                   { Create Magic Mini-List? }
  112.    MagicMiniArchive,            { Create Archive of Mini-List? }
  113.    NoticeCDRom,                 { If CD-Rom directory, treat differently? }
  114.    SortAreas        : Boolean;  { Sort areas? }
  115.    Xcl              : String[48];   { excluded extensions }
  116.    uuword           : Word;     { unused }
  117.    FBBSDescColumn   : Word;     { Column actual description begins in FBBS }
  118.    LogFile,                     { "DIZL.LOG" }
  119.    TempDir,                     { "DIZLWORK.TMP" }
  120.    MagicFile,                   { Path+Name of Magic Names File }
  121.    ListArchiveName,             { Name of archive used when archiving lists }
  122.    MagicArchiveName,            { Name of archive created for MiniList }
  123.    IncludeWithArc   : PathStr;  { Name of any file to add to archive }
  124.    ListFileName,                { = 'ALLFILES.LST';  }
  125.    AreasFilename,               { = 'AREAFILE.LST'; }
  126.    HeaderFile,                  { = 'DIZHEAD.FRM'; }
  127.    FooterFile,                  { = 'DIZFOOT.FRM';}
  128.    FilesBBS,                    { = 'FILES.BBS';}
  129.    MagicMiniListName,           { Name of MiniList (in Home dir) }
  130.    MagicDizInclude,             { Name of Description file to add to MiniList}
  131.    MagicHeaderFile,             { Name of Header file for Majik List }
  132.    MagicFooterFile,             { Name of Footer file for Majik List }
  133.    DizIncludeName   : String[12];{ Name of Description file to add to archive }
  134.    NoDescStr        : String[99]; { = 'No description for this file is currently available.';}
  135.    ExecCmds         : ExecArray;
  136.   End;
  137. Implementation
  138. End.
  139.  
  140.